<?php 
header("content-type:text/html;charset=utf8");
$names = $_POST['names'];
$pwd = $_POST['pwd'];
$pdo = new PDO("mysql:host=127.0.0.1;dbname=07c","root","root");
$sql = "select * from users where names = '$names' and pwd = '$pwd'";
// print_r($sql);die;
$res = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);
if($res)
{
	echo "<script>alert('登陆成功');location.href='show.php';</script>";
}
else
{
	echo "<script>alert('用户名或密码错误');location.href='login.html';</script>";
}


 ?>